package com.SmileBreaker;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;

public class NewGameView extends View
{
	private NewGameActivity activity;

	public NewGameView(Context context, AttributeSet attrs) {
		super(context, attrs);
		
    	BitmapFactory.Options option = new BitmapFactory.Options();
    	option.inSampleSize = 1;
    	option.inPurgeable = true;
    	option.inDither = true;
    	
		activity = (NewGameActivity)context;
	}
	
	protected void onDraw(Canvas canvas)
	{
		canvas.translate(DisplayInfo.startPaintPoint.getX(), DisplayInfo.startPaintPoint.getY());
		canvas.scale(DisplayInfo.displayRatio, DisplayInfo.displayRatio);
		
		canvas.drawBitmap(activity.getBackground(), 0, 0, null);
		canvas.drawBitmap(activity.getBackground_buttons(), 0, 0, null);
		canvas.drawBitmap(activity.getTitleBitmap(), (int)(-50 * DisplayInfo.WHOLE_RATIO), (int)(50 * DisplayInfo.WHOLE_RATIO), null);
		
		activity.getOkSign().Draw(canvas);
		
		super.onDraw(canvas);
	}
	
}






